package collection;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;

public class CollectionDemo1 {
    public static void main(String[] args) {
        //Collection c = new ArrayList();

        Collection a = new HashSet();
        a.add("one");
        a.add("two");
        a.add("three");
        a.add("four");
        a.add("five");
        System.out.println(a);
        System.out.println(a.size());
        System.out.println("a是否为空集合"+a.isEmpty());
        a.clear();
        System.out.println("a是否为空集合"+a.isEmpty());
    }
}
